﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace CoolCode.Controls
{
    public partial class Alert : UserControl
    {
        public Alert()
        {
            InitializeComponent();
            this.alert.OnClose += new RoutedEventHandler(this.ClosePanel);
            this.mask.MouseLeftButtonDown += new MouseButtonEventHandler(mask_MouseLeftButtonDown);
        }

        public Alert(string info)
            : this()
        {
            this.info.Text = info;
        }

        public void ClosePanel(object sender, RoutedEventArgs e)
        {
            this.Visibility = Visibility.Collapsed;
        }

        void mask_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            //this.Visibility = Visibility.Collapsed;
        }
    }
}
